Pagelist |
Last changed on Wednesday, 28th July; at 6:46pm (UTC+1) Site UpdateI updated the way the read page works today. It now searches the content directory for all files, and displays a list of them down the left hand side as the menu. Originally, it read from a menu.txtThe change in code was: <td class="leftbar"><?php
$file = fopen("content/menu.txt", "r") or die("Unable to open menu.txt!"); while(!feof($file)) { $name = fgets($file); print "<li><a href=\"read.php?name=$name\">$name</a></li>"; } fclose($file); ?></td> to <td class="leftbar"><?php
$array = glob("content/*.txt"); $i = 0; $name = ""; while ($array[$i]) { sscanf($array[$i], "content/%[^.].txt", $name); print "<li><a href=\"read.php?name=$name\">$name</a></li>"; $i++; } ?></td> |
Tags |